home *** CD-ROM | disk | FTP | other *** search
- ;for a variety of warships goal 2 1 = "normal" status; goal 2 2 = the enemy has few or no ships
- ;best ship-builders = byzantines, japanese, persian, saracen, viking
- ;secondary = briton, celts, chinese, turk
- ;tertiary = franks, goths, mongols, teuton,
- ;first make sure that there is only _one_ main ship-builder
-
- (defrule
- (goal boat-strategy MANYBOATS)
- =>
- (set-goal sea-owner NOTICE)
- (disable-self)
- )
-
- (defrule
- (taunt-detected any-ally 202)
- =>
- (acknowledge-taunt this-any-ally 202)
- (set-goal sea-owner NO)
- (disable-self)
- )
-
- ;best ship-builders
- (defrule
- (goal sea-owner NOTICE)
- (or
- (or
- (civ-selected byzantine)
- (civ-selected japanese)
- )
- (or
- (or
- (civ-selected persian)
- (civ-selected saracen)
- )
- (civ-selected viking)
- )
- )
- (player-in-game any-computer-ally)
- =>
- (chat-to-player-using-id every-ally 22408) ;202
- (set-goal sea-owner YES)
- (disable-self)
- )
-
- (defrule
- (goal sea-owner NOTICE)
- (game-time > 10)
- (player-in-game any-computer-ally)
- (or
- (or
- (civ-selected briton)
- (civ-selected celtic)
- )
- (or
- (civ-selected chinese)
- (civ-selected turkish)
- )
- )
- =>
- (chat-to-player-using-id every-ally 22408) ;202
- (set-goal sea-owner YES)
- (disable-self)
- )
-
- (defrule
- (goal sea-owner NOTICE)
- (game-time > 20)
- (player-in-game any-computer-ally)
- (or
- (or
- (civ-selected frankish)
- (civ-selected gothic)
- )
- (or
- (civ-selected mongol)
- (civ-selected teutonic)
- )
- )
- =>
- (chat-to-player-using-id every-ally 22408) ;202
- (set-goal sea-owner YES)
- (disable-self)
- )
-
- ;don't let the main ship builder join the human player!
- (defrule
- (goal sea-owner YES)
- (not (goal personality 0) )
- =>
- (set-goal personality 0)
- )
-
- ;make sure we can ALWAYS build a transport-ship ...
- (defrule
- (population >= pop-cap)
- (building-type-count dock > 0)
- (unit-type-count transport-ship == 0)
- (can-afford-unit transport-ship)
- (or
- (attack-soldier-count > 0)
- (goal rush-control RUSHING)
- )
- =>
- (delete-unit fishing-ship)
- )
-
- (defrule
- (population >= pop-cap)
- (building-type-count dock > 0)
- (unit-type-count fishing-ship == 0)
- (unit-type-count transport-ship == 0)
- (can-afford-unit transport-ship)
- (or
- (attack-soldier-count > 0)
- (goal rush-control RUSHING)
- )
- =>
- (delete-unit villager)
- )
-
- (defrule
- (unit-type-count-total transport-ship == 0)
- (or
- (attack-soldier-count > 0)
- (goal rush-control RUSHING)
- )
- (can-train-with-escrow transport-ship)
- =>
- (release-escrow wood)
- (train transport-ship)
- )
-
- (defrule
- (attack-soldier-count >= 10)
- (unit-type-count-total transport-ship < 2)
- (can-train transport-ship)
- =>
- (train transport-ship)
- )
-
- (defrule
- (attack-soldier-count >= 15)
- (research-completed ri-careening)
- (unit-type-count-total transport-ship < 3)
- (can-train transport-ship)
- =>
- (train transport-ship)
- )
-
- ;*****************************************
- ;FEUDAL AGE
- (defrule
- (current-age == feudal-age)
- (warboat-count < ten-percent-pop)
- (can-train galley)
- (or
- (or
- (goal sea-owner YES)
- (not (goal upgrade-conflict NOTICE) )
- )
- (or
- (building-type-count-total blacksmith > 0)
- (wood-amount >= 265)
- )
- )
- =>
- (train galley-line)
- (set-goal make-fire-boat YES)
- )
-
- (defrule
- (goal sea-owner YES)
- (current-age == feudal-age)
- (warboat-count < five-percent-pop)
- (can-train-with-escrow galley)
- (not (can-train galley) )
- =>
- (release-escrow wood)
- (release-escrow gold)
- (train galley)
- (set-goal make-fire-boat YES)
- )
-
- ;*****************************************
- ;CASTLE AGE
- #load-if-defined VIKING-CIV
- (defrule
- (current-age == castle-age)
- (can-train longboat)
- (or
- (goal sea-owner YES)
- (building-type-count-total university > 0)
- )
- (or
- (and
- (not (goal 2 2) )
- (warboat-count < twenty-percent-pop)
- )
- (warboat-count < ten-percent-pop)
- )
- =>
- (train longboat)
- (set-goal make-fire-boat YES)
- )
-
- (defrule
- (goal sea-owner YES)
- (current-age == castle-age)
- (warboat-count < five-percent-pop)
- (can-train-with-escrow longboat)
- (nor
- (can-train longboat)
- (goal 2 2)
- )
- =>
- (release-escrow wood)
- (release-escrow gold)
- (train longboat)
- (set-goal make-fire-boat YES)
- )
-
- #end-if
-
- ;fire-ships
- (defrule
- (goal make-fire-boat YES)
- (current-age == castle-age)
- (can-train fire-ship)
- (or
- (goal sea-owner YES)
- (building-type-count-total university > 0)
- )
- (or
- (and
- (not (goal 2 2) )
- (warboat-count < twenty-percent-pop)
- )
- (warboat-count < ten-percent-pop)
- )
- =>
- (train fire-ship)
- (set-goal make-fire-boat NO)
- )
-
- (defrule
- (goal sea-owner YES)
- (current-age == castle-age)
- (goal make-fire-boat YES)
- (warboat-count < five-percent-pop)
- (can-train-with-escrow fire-ship)
- (nor
- (can-train fire-ship)
- (goal 2 2)
- )
- =>
- (release-escrow wood)
- (release-escrow gold)
- (train fire-ship)
- (set-goal make-fire-boat NO)
- )
-
- ;demolition-ships
- (defrule
- (warboat-count < ten-percent-pop)
- (unit-type-count-total demolition-ship-line < five-percent-pop)
- (nor
- (can-train demolition-ship-line)
- (goal 2 2)
- )
- =>
- (train demolition-ship-line)
- )
-
- (defrule
- (current-age == castle-age)
- (can-train galley-line)
- (not (unit-available longboat-line) )
- (or
- (goal sea-owner YES)
- (building-type-count-total university > 0)
- )
- (or
- (and
- (not (goal 2 2) )
- (warboat-count < twenty-percent-pop)
- )
- (warboat-count < ten-percent-pop)
- )
- =>
- (train galley-line)
- (set-goal make-fire-boat YES)
- )
-
- (defrule
- (goal sea-owner YES)
- (current-age == castle-age)
- (warboat-count < five-percent-pop)
- (can-train-with-escrow galley-line)
- (nor
- (can-train galley-line)
- (or
- (unit-available longboat-line)
- (goal 2 2)
- )
- )
- =>
- (release-escrow wood)
- (release-escrow gold)
- (train galley-line)
- (set-goal make-fire-boat YES)
- )
-
- ;*****************************************
- ;IMPERIAL AGE
-
- ;cannon-galleons
- (defrule
- (current-age == imperial-age)
- (can-train cannon-galleon-line)
- (or
- (warboat-count < twenty-percent-pop)
- (and
- (goal sea-owner YES)
- (warboat-count < thirty-percent-pop)
- )
- )
- (or
- (unit-type-count-total cannon-galleon-line < five-percent-pop)
- (and
- (goal 2 2)
- (unit-type-count-total cannon-galleon-line < fifteen-percent-pop)
- )
- )
- =>
- (train cannon-galleon-line)
- (set-goal make-fire-boat YES)
- )
-
- (defrule
- (goal sea-owner YES)
- (current-age == imperial-age)
- (warboat-count < five-percent-pop)
- (can-train-with-escrow cannon-galleon-line)
- (nor
- (can-train cannon-galleon-line)
- (goal 2 2)
- )
- =>
- (release-escrow wood)
- (release-escrow gold)
- (train cannon-galleon-line)
- (set-goal make-fire-boat YES)
- )
-
- ;fire-ships
- (defrule
- (goal make-fire-boat YES)
- (current-age == imperial-age)
- (can-train fire-ship-line)
- (or
- (and
- (not (goal 2 2) )
- (or
- (and
- (goal sea-owner YES)
- (warboat-count < thirty-percent-pop)
- )
- (warboat-count < twenty-percent-pop)
- )
- )
- (warboat-count < ten-percent-pop)
- )
- =>
- (train fire-ship-line)
- (set-goal make-fire-boat NO)
- )
-
- (defrule
- (goal sea-owner YES)
- (goal make-fire-boat YES)
- (current-age == imperial-age)
- (warboat-count < five-percent-pop)
- (can-train-with-escrow fire-ship-line)
- (nor
- (can-train fire-ship-line)
- (goal 2 2)
- )
- =>
- (release-escrow wood)
- (release-escrow gold)
- (train fire-ship-line)
- (set-goal make-fire-boat NO)
- )
-
- (defrule
- (current-age == imperial-age)
- (can-train galleon)
- (not (unit-available longboat-line) )
- (or
- (and
- (not (goal 2 2) )
- (or
- (and
- (goal sea-owner YES)
- (warboat-count < thirty-percent-pop)
- )
- (warboat-count < twenty-percent-pop)
- )
- )
- (warboat-count < ten-percent-pop)
- )
- =>
- (train galleon)
- (set-goal make-fire-boat YES)
- )
-
- (defrule
- (goal sea-owner YES)
- (current-age == imperial-age)
- (warboat-count < five-percent-pop)
- (can-train-with-escrow galley-line)
- (nor
- (can-train galley-line)
- (or
- (unit-available longboat-line)
- (goal 2 2)
- )
- )
- =>
- (train galley-line)
- (set-goal make-fire-boat YES)
- )
-